package com.bwie.gddproject.utils;

import android.app.Activity;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by 我走路带风 on 2017/12/12.
 */

public class ActivityStroeUtil {
    private static List<Activity> activityList = new ArrayList<>();

    public static void addActivity(Activity activity) {
        activityList.add(activity);
    }

    public static void finishAllActivity() {
        if (activityList != null) {
            for (Activity ac : activityList
                    ) {
                ac.finish();
            }
            activityList.clear();
        }
    }
}
